package io.litchi.auth.Infrastructure.exception.type;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.http.HttpStatus;

/**
 * description: refreshToken过期异常
 *
 * @author helang
 * @since 2025-09-12
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class RefreshTokenExpiredException extends RuntimeException {

    private static final String DEFAULT_MESSAGE = "登录信息已过期,请重新登录";
    private static final Integer DEFAULT_CODE = HttpStatus.UNAUTHORIZED.value();
    private Integer code;

    public RefreshTokenExpiredException() {
        super(DEFAULT_MESSAGE);
        this.code = DEFAULT_CODE;
    }

    public RefreshTokenExpiredException(String message) {
        super(message);
        this.code = DEFAULT_CODE;
    }

}